﻿<style>
    .field-validation-error
    {
        display:block;
    }

    ul.two-columns li {
        width: 50%;
        float: left;
        margin: 0;
        padding: 0;
        list-style-type: none;
    }

    /* Clear Fix */
    .clearfix:after {
        visibility: hidden;
        display: block;
        font-size: 0;
        content: " ";
        clear: both;
        height: 0;
    }


    * html .clearfix {
        zoom: 1;
    }
    /* IE6 */
    *:first-child + html .clearfix {
        zoom: 1;
    }
    /* IE7 */
</style>

<script src="~/Scripts/jquery-1.8.2.js"></script>
<script src="~/Scripts/jquery.validate.js"></script>
<script src="~/Scripts/jquery.validate.unobtrusive.js"></script>

@{
    ViewBag.Title = "Defect";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
@section featured {
    <section class="featured">
        <div class="content-wrapper">
            <hgroup class="title">
                <h1>@ViewBag.Title</h1>
                <h2>@ViewBag.Message</h2>
            </hgroup>
            <p>
                Connected Domain: @ViewBag.Domain <br />
                Connected Project: @ViewBag.Project <br />
                <br />
                Put any other info here about how to use the page I suppose.
            </p>
        </div>
    </section>
}

@model CreateDefect.Models.UserDefect


<form method="post" action="/Home/SubmitDefect">
    <fieldset>
        <legend>Defect</legend>
        <ul class="two-columns clearfix">
            @{System.Reflection.PropertyInfo[] properties = typeof(CreateDefect.Models.UserDefect).GetProperties();}

            @foreach (var a in properties)
            {                
                <li>
                    @Html.Label(a.Name)
@*                        @Html.TextBox(a.Name, "", new { @onclick = "check()" })*@
                    @Html.TextBox(a.Name, "")
                    @Html.ValidationMessage(a.Name)
                </li>
            }
        </ul>
        <input type="submit" value="Create" id="submit_Button"/>
    </fieldset>
</form>

